//
//  ILRecommendTableViewCell.m
//  ILife
//
//  Created by lanou on 15/10/27.
//  Copyright © 2015年 ILife. All rights reserved.
//

#import "ILRecommendTableViewCell.h"
#import <UIImageView+WebCache.h>
@implementation ILRecommendTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self =[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _recommendImageView = [[UIImageView alloc]initWithFrame:CGRectMake(40, 20, SCREEN_WIDTH/3, SCREEN_WIDTH/5)];
        [self.contentView addSubview:_recommendImageView];
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(50+10+SCREEN_WIDTH/3, 20, SCREEN_WIDTH - (80+20+SCREEN_WIDTH/3), SCREEN_WIDTH/5 - 20)];
        _titleLabel.font = [UIFont systemFontOfSize:15];
        _titleLabel.numberOfLines = 0;
        [self.contentView addSubview:_titleLabel];
    }
    return self;
}

-(void)setRecommendListModel:(ILMusicListModel *)recommendListModel
{
    _recommendListModel = recommendListModel;
    [_recommendImageView sd_setImageWithURL:[NSURL URLWithString:recommendListModel.image]placeholderImage:[UIImage imageNamed:@"ilife"]];
    _titleLabel.text = recommendListModel.title;

}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
